﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BLL;
using Models;
using System.Data.SqlClient;

namespace Xingyungou.XiangLei
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_dl_Click(object sender, EventArgs e)
        {
            Yuangong yg=new Yuangong();
            yg.AdministratorYH = this.tb_zh.Text;
            yg.Password = this.tb_mm.Text;
            DataTable dt= YuangongBLL.SelectZH(yg);
            if (dt.Rows.Count>0)
            {
                Response.Write("<script>alert('登录成功');</script>");
                ////返回原页面，跳转
                //Response.Write("<script>window.location.href='商品表.aspx'</script>");
                Response.Write("<script>window.location.href='../LiuZhuo/index.aspx'</script>");

            }
            else
            {
                Response.Write("<script>alert('登录失败');</script>");
            }
        }
    }
}